<?php
// +----------------------------------------------------------------------
// | 幕小铺
// +----------------------------------------------------------------------
// | 版权所有 2016~2020 幕小铺科技（大连）有限公司
// +----------------------------------------------------------------------
// | 2020/03/14
// +----------------------------------------------------------------------

namespace app\video\model;

use think\Model;

/**
 * 视频审核 模型
 * @package app\user_center\model
 */
class VideoPlayAiExamine extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'xm_video_play_ai_examine';

    /**
     * 添加数据
     * @param play_id int 视频id
     * @param video_id string 视频id
     * @param examine_status int 审核状态 0 待审核 1审核中 2已审核 3已拒绝 4上传中
     * @param examine_time int 机审时间
     * @param artificial_status int 人工审核状态 0待审 1通过 2拒绝(必须写理由）
     * @param artificial_time int 人工审核时间
     * @param artificial_reason string 人工审核理由
     * @param artificial_uid int 审核人id
     * @author jason wang <120907037@qq.com>
     * @return bool
     */
    public function addData($play_id, $video_id, $examine_status=4, $examine_time='', $artificial_status=0, $artificial_time='', $artificial_reason='', $artificial_uid=''){
        $this -> play_id                = $play_id;
        $this -> video_id               = $video_id;
        $this -> examine_status         = $examine_status;
        $this -> examine_time           = $examine_time;
        $this -> artificial_status      = $artificial_status;
        $this -> artificial_time        = $artificial_time;
        $this -> artificial_reason      = $artificial_reason;
        $this -> artificial_uid         = $artificial_uid;
        $res = $this -> isUpdate(false) -> save();
        if($res){
            return array_out(200, 'success');
        }else{
            return array_out(-1001, 'error');
        }
    }


}
